<template>
<div class="PIDdiv1">
    <el-row class="myCreateOrderrow14" type="flex" justify="center">
        <el-col :span="18" class="myCreateOrdercol14" style="margin-top: 30px;">
            <div class="PIDdiv2">
                <span class="PIDdiv2Span1">商品金额：</span>
            </div>
        </el-col>
        <el-col :span="6" class="myCreateOrdercol14" style="margin-top: 30px;">
            <div class="PIDdiv2">
                <span class="PIDdiv2Span1">¥{{TotalPrice}}</span>
            </div>
        </el-col>
    </el-row>
    <el-row class="myCreateOrderrow14" type="flex" justify="center">
        <el-col :span="18" class="myCreateOrdercol14">
            <div class="PIDdiv2">
                <span class="PIDdiv2Span1">运费：</span>
            </div>
        </el-col>
        <el-col :span="6" class="myCreateOrdercol14">
            <div class="PIDdiv2">
                <span class="PIDdiv2Span1">¥0</span>
            </div>
        </el-col>
    </el-row>
    <el-row class="myCreateOrderrow14" type="flex" justify="center">
        <el-col :span="18" class="myCreateOrdercol14">
            <div class="PIDdiv2">
                <span class="PIDdiv2Span1">优惠券优惠：</span>
            </div>
        </el-col>
        <el-col :span="6" class="myCreateOrdercol14">
            <div class="PIDdiv2">
                <span class="PIDdiv2Span1">-¥{{Discount.toFixed(1)}}</span>
            </div>
        </el-col>
    </el-row>
    <el-row class="myCreateOrderrow14" type="flex" justify="center">
        <el-col :span="18" class="myCreateOrdercol14" style="height: 50px;">
            <div class="PIDdiv2" style="margin-top: 5px;">
                <span class="PIDdiv2Span2">待支付：</span>
            </div>
        </el-col>
        <el-col :span="6" class="myCreateOrdercol14">
            <div class="PIDdiv2" style="margin-top: 0px;">
                <span class="PIDdiv2Span3">￥</span>
                <span class="PIDdiv2Span4">{{TotalRealprice.toFixed(1)}}</span>
            </div>
        </el-col>
    </el-row>
    <el-row class="myCreateOrderrow14" type="flex" justify="center" style="margin-bottom:75px">
        <el-col :span="24" class="myCreateOrdercol14" style="height: 30px;">
            <div class="PIDdiv2" style="margin-right:20px;margin-left:20px;width:280px;">
                <span class="PIDdiv2Span1" style="opacity:0.8;">
                    <!-- 送货至：南安市 福建省泉州市南安市康美镇康元路8号，我是我自己，181*****073 -->
                    {{areaName}} {{address}}，{{name}}，{{phone.slice(0,3)}}*****{{phone.slice(8,11)}}
                </span>
            </div>
        </el-col>
    </el-row>
</div>
</template>

<script>
    export default {
        name:'PxCOPayInfoDown',
        data(){
            return{
                name:'',
                areaName:'',
                phone:'',
                address:'',
                    //查询勾选的购物车上面,主页能跳转到已经创建好的订单界面,这里还没有创建好
                TotalPrice:'',
                Discount:0,
                TotalRealprice:0,
            }
        },
        mounted(){
            this.$bus.$on('CheckedAddress',(data)=>{
                this.name=data.name
                this.areaName=data.areaName
                this.phone=data.phone
                this.address=data.address
            })
            this.$bus.$on('TransferPrice',(TotalPrice,Discount,TotalRealprice)=>{
                this.TotalPrice=TotalPrice
                this.Discount=Discount
                this.TotalRealprice=TotalRealprice
            })
        },
        beforeDestroy(){
            this.$bus.$off('CheckedAddress')
            this.$bus.$off('TransferPrice')
        }
    }
</script>

<style scoped>
.PIDdiv1{
    margin: 0 auto;
    max-width: 1000px;
    border-top: 1px solid rgb(179, 179, 179 , 0.7);
    border-left: 1px solid rgb(179, 179, 179 , 0.7);
    border-right: 1px solid rgb(179, 179, 179 , 0.7);
}
.myCreateOrderrow14{
    margin: 0 auto;
    max-width: 1000px;
    margin-top: 2px;
    height: 100%;
    font-size: 14px;
}
.myCreateOrdercol14{
    margin-left: 10px;
    margin-right: 0px;
    height: 23px;
}
.PIDdiv2{
    font-size: 13px;
    float: right;
    margin-right: 20px;
}
.PIDdiv2Span2{
    font-size: 18px;
    font-weight: 550;
}
.PIDdiv2Span3{
    font-weight: 550;
    color: rgb(228, 67, 102);;
}
.PIDdiv2Span4{
    font-size: 25px;
    font-weight: 550;
    color: rgb(228, 67, 102);;
}
</style>